package com.github.catvod.spider;

import android.text.TextUtils;
import android.util.Base64;
import com.github.catvod.crawler.Spider;
import com.github.catvod.crawler.SpiderDebug;
import com.github.catvod.parser.C0000;
import com.github.catvod.parser.C0001;
import com.github.catvod.parser.C0002;
import com.github.catvod.parser.C0003;
import com.github.catvod.parser.C0004;
import com.github.catvod.parser.C0005;
import com.github.catvod.parser.C0006;
import com.github.catvod.parser.C0007;
import com.github.catvod.parser.C0008;
import com.github.catvod.parser.C0009;
import com.github.catvod.spider.merge.C0011;
import com.github.catvod.spider.merge.C0012;
import com.github.catvod.spider.merge.C0013;
import com.github.catvod.spider.merge.C0014;
import com.github.catvod.spider.merge.C0015;
import com.github.catvod.spider.merge.CE;
import com.github.catvod.spider.merge.L;
import com.github.catvod.spider.merge.fP;
import com.github.catvod.spider.merge.jP;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.TreeMap;
import okhttp3.Call;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

/* loaded from: classes.dex */
public class Shark extends Spider {
    public static String h = "";

    /* renamed from: short, reason: not valid java name */
    private static final short[] f49short = {1074, 1047, 1050, 1024, 1055, 1053, 1113, 1092, 1112, 1092, 1112, 1094, 1110, 1118, 1082, 1055, 1048, 1027, 1038, 1101, 1110, 1059, 1101, 1110, 1079, 1048, 1042, 1028, 1049, 1055, 1042, 1110, 1095, 1090, 1101, 1110, 1060, 1043, 1042, 1051, 1055, 1110, 1076, 1027, 1055, 1050, 1042, 1113, 1092, 1093, 1095, 1095, 1093, 1060, 1085, 1077, 1088, 1077, 1119, 2134, 2166, 1269, 1199, 1187, 1199, 2579, 2647, 2638, 2642, 2643, 2044, 1952, 1979, 1970, 1953, 1976, 2044, 1970, 1955, 1978, 2045, 1955, 1979, 1955, 2028, 1970, 1968, 1959, 1978, 1980, 1981, 2030, 1968, 1980, 1981, 1973, 1978, 1972, 1952, 810, 806, 807, 815, 800, 814, 2665, 2676, 2669, 2676, 2660, 2402, 1370, 1350, 1355, 1363, 1359, 1368, 1347, 1348, 1356, 1349, 1369, 2277, 2297, 2292, 2284, 2288, 2279, 2299, 2292, 2296, 2288, 939, 951, 954, 930, 958, 937, 945, 946, 958, 944, 948, 942, 724, 722, 708, 723, 652, 704, 710, 708, 719, 725, 2235, 2216, 2239, 2238, 2212, 2210, 2211, 716, 720, 716, 720, 718, 2911, 2931, 2931, 2935, 2933, 2937, 2266, 2259, 2266, 2259, 2176, 2184, 1975, 1961, 1966, 1956, 1967, 1975, 2030, 1964, 1967, 1955, 1953, 1972, 1961, 1967, 1966, 2030, 1960, 1970, 1957, 1958, 1665, 1687, 1670, 1759, 1681, 1693, 1693, 1689, 1691, 1687, 662, 2062, 2112, 2129, 2120, 2063, 2129, 2121, 2129, 2062, 2135, 2064, 2063, 2114, 2125, 2112, 2130, 2130, 2120, 2119, 2136, 2062, 2114, 2126, 2127, 2133, 2116, 2127, 2133, 2078, 2129, 2112, 2118, 2116, 2076, 976, 963, 980, 976, 21501, -28035, 21925, 20911, 2428, 2415, 2400, 2405, 24898, 19521, 26619, 1777, 1788, 1781, 1760, 21195, -27829, 32728, 21544, 2914, 2927, 2918, 2931, 2889, 2943, 2930, 2489, 2469, 2465, 2482, 22814, -26466, 22018, 18069, 754, 739, 741, 743, 1156, 1173, 1171, 1169, 1175, 1179, 1153, 1178, 1152, 3180, 3177, 3181, 3177, 3188, 1270, 1261, 1270, 1251, 1262, 2135, 2130, 2120, 2127, 583, 2438, 2438, 2438, 2777, 2752, 2763, 2800, 2764, 2752, 2753, 2779, 2762, 2753, 2779, 929, 952, 947, 904, 947, 958, 933, 946, 948, 931, 952, 933, 1891, 1914, 1905, 1866, 1908, 1910, 1889, 1914, 1895, 3065, 3040, 3051, 3024, 3069, 3050, 3042, 3054, 3069, 3044, 3068, 1073, 1064, 1059, 1048, 1062, 1077, 1058, 1062, 2118, 2143, 2132, 2159, 2121, 2133, 2129, 2114, 967, 990, 981, 1006, 961, 984, 978, 1987, 2010, 2001, 2026, 2011, 2004, 2008, 2000, 3006, 2983, 2988, 2967, 2977, 2988, 503, 441, 424, 433, 502, 424, 432, 424, 503, 430, 489, 502, 424, 436, 441, 417, 445, 426, 503, 444, 445, 428, 441, 433, 436, 427, 487, 430, 439, 444, 391, 433, 444, 485, 453, 448, 469, 448, 807, 806, 823, 802, 810, 815, 1527, 1530, 1523, 1510, 1500, 1517, 1506, 1518, 1510, 480, 505, 498, 457, 501, 506, 503, 485, 485, 623, 627, 638, 614, 576, 618, 621, 627, 576, 627, 630, 620, 619, 785, 790, 776, 791, 316, 295, 288, 312, 318, 298, 311, 309, 3267, 3276, 3264, 3272, 487, 2750, 2745, 2727, 823, 1005, 1012, 1023, 964, 1003, 1015, 1018, 994, 964, 1021, 1001, 1012, 1014, 1716, 1709, 1702, 1693, 1714, 1710, 1699, 1723, 1693, 1719, 1712, 1710, 1811, 1814, 1804, 1803, 3319, 3322, 3315, 3302, 3292, 3309, 3298, 3310, 3302, 2583, 2649, 2632, 2641, 2582, 2632, 2640, 2632, 2583, 2638, 2569, 2582, 2640, 2647, 2645, 2653, 2583, 2636, 2625, 2632, 2653, 2635, 1627, 1630, 1611, 1630, 384, 397, 388, 401, 391, 28645, -28899, 2092, 2081, 2088, 2109, 2055, 2097, 2108, 1063, 1064, 1061, 1079, 1079, 1656, 1633, 1642, 1617, 1660, 1643, 1635, 1647, 1660, 1637, 1661, 2654, 2631, 2636, 2679, 2648, 2625, 2635, 2081, 2104, 2099, 2056, 2105, 2102, 2106, 2098, 2875, 2850, 2857, 2834, 2852, 2857, 780, 783, 2250, 2180, 2197, 2188, 2251, 2197, 2189, 2197, 2250, 2195, 2260, 2251, 2189, 2186, 2184, 2176, 2250, 2177, 2180, 2193, 2180, 2266, 2193, 2204, 2197, 2176, 2234, 2188, 2177, 2264, 523, 526, 539, 526, 1222, 1237, 1218, 1276, 1233, 1246, 1236, 1276, 1241, 1219, 1220, 3035, 3016, 3039, 3033, 3012, 3022, 3020, 3009, 3058, 3009, 3020, 3011, 3017, 3038, 2434, 2439, 2461, 2458, 923, 955, 2163, 2638, 388, 388, 472, 451, 458, 473, 448, 388, 458, 475, 450, 389, 475, 451, 475, 404, 458, 456, 479, 450, 452, 453, 406, 475, 458, 473, 472, 462, 477, 452, 463, 1315, 1330, 1313, 1312, 1334, 3039, 3032, 3014, 1610, 1606, 1619, 1604, 1615, 1614, 1609, 1600, 1606, 1631, 1620, 1647, 1602, 1621, 1629, 1617, 1602, 1627, 1603, 3309, 3316, 3327, 3268, 3307, 3314, 3320, 2631, 2654, 2645, 2670, 2655, 2640, 2652, 2644, 2315, 2322, 2329, 2338, 2324, 2329, 1376, 1326, 1343, 1318, 1377, 1343, 1319, 1343, 1376, 1337, 1406, 1377, 1340, 1322, 1326, 1341, 1324, 1319, 1376, 1323, 1326, 1339, 1326, 1392, 1336, 1323, 1394, 2782, 2700, 2689, 2696, 2717, 2727, 2705, 2716, 2757, 2760, 2782, 2696, 2713, 2719, 2717, 2757, 2761, 1781, 1776, 1765, 1776, 1608, 1630, 1626, 1609, 1624, 1619, 1636, 1631, 1626, 1615, 1626, 943, 938, 944, 951};
    private String W;
    JSONArray u;
    private String V0 = "";
    private String j = C0017.m52(f49short, 0, 59, 1142);
    private String q = "";
    private String I = "";
    private String oC = "";
    private String BQ = "";

    public Shark() {
        int m32 = C0009.m32();
        int i = 1616;
        while (true) {
            i ^= 1633;
            switch (i) {
                case 14:
                case 49:
                    i = m32 >= 0 ? 1709 : 1678;
                case 204:
                    System.out.println(Float.valueOf(C0012.m36("LiTb1g8Fel")));
                    break;
                case 239:
                    break;
            }
            return;
        }
    }

    private void V0() {
        String[] split = new String(Base64.decode(this.BQ.substring(1), 0)).split(C0005.m17(f49short, 59, 2, 2058));
        boolean contains = split[1].contains(C0012.m37(f49short, 61, 4, 1243));
        int i = 1616;
        while (true) {
            i ^= 1633;
            switch (i) {
                case 14:
                case 49:
                    i = !contains ? 1709 : 1678;
                case 204:
                    boolean contains2 = split[1].contains(C0001.m3(f49short, 65, 5, 2621));
                    int i2 = 1740;
                    while (true) {
                        i2 ^= 1757;
                        switch (i2) {
                            case 17:
                                i2 = contains2 ? 1833 : 1802;
                            case 54:
                            case 471:
                                this.V0 = split[0];
                                int i3 = 48767;
                                while (true) {
                                    i3 ^= 48784;
                                    switch (i3) {
                                        case 14:
                                            break;
                                        case 239:
                                            i3 = 48798;
                                            continue;
                                    }
                                }
                                break;
                            case 500:
                                int i4 = 1864;
                                while (true) {
                                    i4 ^= 1881;
                                    switch (i4) {
                                        case 17:
                                            i4 = 48674;
                                            continue;
                                        case 47483:
                                            break;
                                    }
                                }
                                break;
                        }
                    }
                    break;
                case 239:
                    break;
            }
        }
        this.V0 = fP.oq(split[0], null);
        this.q = split[1];
        this.oC = split[2];
        JSONObject jSONObject = new JSONObject(jP.h(I(this.V0 + C0005.m17(f49short, 70, 29, 2003)), this.q));
        this.I = jSONObject.getJSONObject(C0017.m52(f49short, 99, 6, 841)).getString(C0005.m17(f49short, 105, 5, 2561)).split(C0005.m17(f49short, 110, 1, 2372))[0];
        this.u = jSONObject.getJSONArray(C0012.m37(f49short, 111, 11, 1322));
        int m10 = C0003.m10();
        int i5 = 48891;
        while (true) {
            i5 ^= 48908;
            switch (i5) {
                case 22:
                case 53:
                    break;
                case 503:
                    i5 = m10 <= 0 ? 49635 : 48953;
                case 32495:
                    System.out.println(C0002.m7("HC9HYHQnAD1SiU9IO"));
                    break;
            }
            return;
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:58:0x0074, code lost:
    
        r0 = 48891;
     */
    /* JADX WARN: Code restructure failed: missing block: B:59:0x0077, code lost:
    
        r0 = r0 ^ 48908;
     */
    /* JADX WARN: Code restructure failed: missing block: B:60:0x007b, code lost:
    
        switch(r0) {
            case 22: goto L71;
            case 503: goto L72;
            default: goto L74;
        };
     */
    /* JADX WARN: Code restructure failed: missing block: B:62:0x007f, code lost:
    
        throw r1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:64:0x0084, code lost:
    
        r0 = 48922;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    private java.lang.String j(java.lang.String r7) {
        /*
            r6 = this;
            r0 = 0
            r1 = r0
        L2:
            org.json.JSONArray r0 = r6.u     // Catch: org.json.JSONException -> L63
            int r2 = r0.length()     // Catch: org.json.JSONException -> L63
            r0 = 1616(0x650, float:2.264E-42)
        La:
            r0 = r0 ^ 1633(0x661, float:2.288E-42)
            switch(r0) {
                case 14: goto L10;
                case 49: goto L13;
                case 204: goto L18;
                case 239: goto L61;
                default: goto Lf;
            }     // Catch: org.json.JSONException -> L63
        Lf:
            goto La
        L10:
            r0 = 1678(0x68e, float:2.351E-42)
            goto La
        L13:
            if (r1 >= r2) goto L10
            r0 = 1709(0x6ad, float:2.395E-42)
            goto La
        L18:
            org.json.JSONArray r0 = r6.u     // Catch: org.json.JSONException -> L63
            org.json.JSONObject r2 = r0.getJSONObject(r1)     // Catch: org.json.JSONException -> L63
            short[] r0 = com.github.catvod.spider.Shark.f49short     // Catch: org.json.JSONException -> L63
            r3 = 122(0x7a, float:1.71E-43)
            r4 = 10
            r5 = 2197(0x895, float:3.079E-42)
            java.lang.String r0 = com.github.catvod.parser.C0009.m30(r0, r3, r4, r5)     // Catch: org.json.JSONException -> L63
            java.lang.String r0 = r2.getString(r0)     // Catch: org.json.JSONException -> L63
            boolean r3 = r7.equals(r0)     // Catch: org.json.JSONException -> L63
            r0 = 1740(0x6cc, float:2.438E-42)
        L34:
            r0 = r0 ^ 1757(0x6dd, float:2.462E-42)
            switch(r0) {
                case 17: goto L3a;
                case 54: goto L3f;
                case 471: goto L53;
                case 500: goto L42;
                default: goto L39;
            }     // Catch: org.json.JSONException -> L63
        L39:
            goto L34
        L3a:
            if (r3 == 0) goto L3f
            r0 = 1833(0x729, float:2.569E-42)
            goto L34
        L3f:
            r0 = 1802(0x70a, float:2.525E-42)
            goto L34
        L42:
            short[] r0 = com.github.catvod.spider.Shark.f49short     // Catch: org.json.JSONException -> L63
            r1 = 132(0x84, float:1.85E-43)
            r3 = 12
            r4 = 987(0x3db, float:1.383E-42)
            java.lang.String r0 = com.github.catvod.spider.merge.C0011.m35(r0, r1, r3, r4)     // Catch: org.json.JSONException -> L63
            java.lang.String r0 = r2.getString(r0)     // Catch: org.json.JSONException -> L63
        L52:
            return r0
        L53:
            int r1 = r1 + 1
            r0 = 1864(0x748, float:2.612E-42)
        L57:
            r0 = r0 ^ 1881(0x759, float:2.636E-42)
            switch(r0) {
                case 17: goto L5d;
                case 47483: goto L2;
                default: goto L5c;
            }
        L5c:
            goto L57
        L5d:
            r0 = 48674(0xbe22, float:6.8207E-41)
            goto L57
        L61:
            r0 = 0
            goto L52
        L63:
            r0 = move-exception
            java.lang.RuntimeException r1 = new java.lang.RuntimeException
            r1.<init>(r0)
            r0 = 48767(0xbe7f, float:6.8337E-41)
        L6c:
            r2 = 48784(0xbe90, float:6.8361E-41)
            r0 = r0 ^ r2
            switch(r0) {
                case 14: goto L74;
                case 239: goto L80;
                default: goto L73;
            }
        L73:
            goto L6c
        L74:
            r0 = 48891(0xbefb, float:6.8511E-41)
        L77:
            r2 = 48908(0xbf0c, float:6.8535E-41)
            r0 = r0 ^ r2
            switch(r0) {
                case 22: goto L7f;
                case 503: goto L84;
                default: goto L7e;
            }
        L7e:
            goto L77
        L7f:
            throw r1
        L80:
            r0 = 48798(0xbe9e, float:6.838E-41)
            goto L6c
        L84:
            r0 = 48922(0xbf1a, float:6.8554E-41)
            goto L77
        */
        throw new UnsupportedOperationException("Method not decompiled: com.github.catvod.spider.Shark.j(java.lang.String):java.lang.String");
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:3:0x0039. Please report as an issue. */
    private HashMap<String, String> q() {
        HashMap<String, String> hashMap = new HashMap<>();
        hashMap.put(C0012.m37(f49short, 144, 10, 673), this.j);
        hashMap.put(C0000.m1(f49short, 154, 7, 2253), C0013.m41(f49short, 161, 5, 766));
        int length = h.length();
        int i = 1616;
        while (true) {
            i ^= 1633;
            switch (i) {
                case 14:
                case 49:
                    i = length > 0 ? 1709 : 1678;
                case 204:
                    hashMap.put(C0013.m41(f49short, 166, 6, 2844), h);
                    break;
                case 239:
                    break;
            }
        }
        return hashMap;
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:18:0x0075. Please report as an issue. */
    protected final String I(String str) {
        h = "";
        TreeMap treeMap = new TreeMap();
        String F8 = fP.F8(str, q(), treeMap);
        System.out.println(C0008.m27(f49short, 172, 6, 2226) + F8);
        boolean contains = F8.contains(C0004.m12(f49short, 178, 20, 1984));
        int i = 1616;
        while (true) {
            i ^= 1633;
            switch (i) {
                case 14:
                case 49:
                    i = contains ? 1709 : 1678;
                case 204:
                    h = "";
                    List list = (List) treeMap.get(C0018.m56(f49short, 198, 10, 1778));
                    list.getClass();
                    Iterator it = list.iterator();
                    while (true) {
                        boolean hasNext = it.hasNext();
                        int i2 = 1740;
                        while (true) {
                            i2 ^= 1757;
                            switch (i2) {
                                case 17:
                                    i2 = hasNext ? 1833 : 1802;
                                case 54:
                                case 471:
                                    break;
                                case 500:
                                    h += ((String) it.next()).split(C0004.m12(f49short, 208, 1, 685))[0];
                                    int i3 = 1864;
                                    while (true) {
                                        i3 ^= 1881;
                                        switch (i3) {
                                            case 17:
                                                i3 = 48674;
                                                break;
                                            case 47483:
                                                break;
                                        }
                                    }
                                    break;
                            }
                            return fP.oq(str, q());
                        }
                    }
                    break;
                case 239:
                    return F8;
            }
        }
    }

    public String categoryContent(String str, String str2, boolean z, HashMap<String, String> hashMap) {
        try {
            int parseInt = Integer.parseInt(str2);
            int i = 1616;
            while (true) {
                i ^= 1633;
                switch (i) {
                    case 14:
                    case 49:
                        i = parseInt == 0 ? 1709 : 1678;
                    case 204:
                        parseInt = 1;
                        break;
                    case 239:
                        break;
                }
            }
            String str3 = this.V0 + C0002.m6(f49short, 209, 34, 2081) + str2;
            JSONObject jSONObject = new JSONObject();
            jSONObject.put(C0005.m17(f49short, 243, 4, 945), C0002.m6(f49short, 247, 4, 661));
            jSONObject.put(C0017.m52(f49short, 251, 4, 2318), C0018.m56(f49short, 255, 3, 587));
            jSONObject.put(C0017.m52(f49short, 258, 4, 1669), C0002.m6(f49short, 262, 4, 931));
            jSONObject.put(C0017.m52(f49short, 266, 7, 2838), str);
            jSONObject.put(C0000.m1(f49short, 273, 4, 2496), C0013.m41(f49short, 277, 4, 2166));
            JSONArray jSONArray = new JSONArray();
            fP.W(fP.j(), str3, jSONObject.toString(), q(), new L.yh(this, jSONArray) { // from class: com.github.catvod.spider.Shark.1

                /* renamed from: short, reason: not valid java name */
                private static final short[] f50short = {3052, 3061, 3070, 3013, 3048, 3071, 3063, 3067, 3048, 3057, 3049, 2229, 2220, 2215, 2204, 2227, 2218, 2208, 587, 594, 601, 610, 595, 604, 592, 600, 3284, 3277, 3270, 3325, 3275, 3270, 2859, 2862, 2875, 2862, 631, 616, 613, 612, 622, 606, 621, 616, 626, 629, 761, 738, 763, 763};
                final JSONArray V0;
                final Shark j;

                {
                    this.j = this;
                    this.V0 = jSONArray;
                    int m33 = C0011.m33();
                    int i2 = 1616;
                    while (true) {
                        i2 ^= 1633;
                        switch (i2) {
                            case 14:
                            case 49:
                                i2 = m33 <= 0 ? 1709 : 1678;
                            case 204:
                                System.out.println(C0016.m49("2LfeAL"));
                                break;
                            case 239:
                                break;
                        }
                        return;
                    }
                }

                @Override // com.github.catvod.spider.merge.L
                public void onFailure(Call call, Exception exc) {
                }

                /* JADX WARN: Failed to find 'out' block for switch in B:39:0x00bf. Please report as an issue. */
                /* JADX WARN: Failed to find 'out' block for switch in B:6:0x0062. Please report as an issue. */
                @Override // com.github.catvod.spider.merge.L
                public String onResponse(String str4) {
                    JSONArray jSONArray2;
                    int i2 = 0;
                    String m12 = C0004.m12(f50short, 0, 11, 2970);
                    String m1 = C0000.m1(f50short, 11, 7, 2243);
                    String m37 = C0012.m37(f50short, 18, 8, 573);
                    String m17 = C0005.m17(f50short, 26, 6, 3234);
                    try {
                        jSONArray2 = new JSONObject(jP.h(str4, this.j.q)).getJSONObject(C0006.m18(f50short, 32, 4, 2895)).getJSONArray(C0001.m3(f50short, 36, 10, 513));
                    } catch (JSONException e) {
                        int i3 = 48767;
                        while (true) {
                            i3 ^= 48784;
                            switch (i3) {
                                case 14:
                                    break;
                                case 239:
                                    i3 = 48798;
                                    break;
                            }
                        }
                    }
                    while (true) {
                        int i4 = i2;
                        int length = jSONArray2.length();
                        int i5 = 1616;
                        while (true) {
                            i5 ^= 1633;
                            switch (i5) {
                                case 14:
                                case 49:
                                    i5 = i4 < length ? 1709 : 1678;
                                case 204:
                                    JSONObject jSONObject2 = jSONArray2.getJSONObject(i4);
                                    JSONObject jSONObject3 = new JSONObject();
                                    jSONObject3.put(m17, jSONObject2.getString(m17));
                                    jSONObject3.put(m37, jSONObject2.getString(m37));
                                    jSONObject3.put(m1, jSONObject2.optString(m1));
                                    String optString = jSONObject2.optString(m12);
                                    boolean equals = optString.equals(C0000.m1(f50short, 46, 4, 663));
                                    int i6 = 1740;
                                    while (true) {
                                        i6 ^= 1757;
                                        switch (i6) {
                                            case 17:
                                                i6 = equals ? 1833 : 1802;
                                            case 54:
                                            case 471:
                                                break;
                                            case 500:
                                                optString = "";
                                                break;
                                        }
                                    }
                                    jSONObject3.put(m12, optString);
                                    this.V0.put(jSONObject3);
                                    i2 = i4 + 1;
                                    int i7 = 1864;
                                    while (true) {
                                        i7 ^= 1881;
                                        switch (i7) {
                                            case 17:
                                                i7 = 48674;
                                            case 47483:
                                                break;
                                        }
                                    }
                                    break;
                                case 239:
                                    break;
                            }
                        }
                        return str4;
                    }
                }
            });
            JSONObject jSONObject2 = new JSONObject();
            jSONObject2.put(C0017.m52(f49short, 281, 4, 642), parseInt);
            int length = jSONArray.length();
            int i2 = 1740;
            while (true) {
                i2 ^= 1757;
                switch (i2) {
                    case 17:
                        if (length != 30) {
                            break;
                        } else {
                            i2 = 1833;
                        }
                    case 54:
                        break;
                    case 471:
                        break;
                    case 500:
                        parseInt++;
                        break;
                    default:
                        continue;
                }
                i2 = 1802;
            }
            jSONObject2.put(C0013.m41(f49short, 285, 9, 1268), parseInt);
            jSONObject2.put(C0012.m37(f49short, 294, 5, 3072), 30);
            jSONObject2.put(C0014.m43(f49short, 299, 5, 1154), Integer.MAX_VALUE);
            jSONObject2.put(C0008.m27(f49short, 304, 4, 2107), jSONArray);
            return jSONObject2.toString();
        } catch (Exception e) {
            SpiderDebug.log(e);
            return "";
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:26:0x0214. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:53:0x027f. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:6:0x01bf. Please report as an issue. */
    public String detailContent(List<String> list) {
        String m37 = C0012.m37(f49short, 308, 1, 571);
        String m17 = C0005.m17(f49short, 309, 3, 2466);
        String m6 = C0002.m6(f49short, 312, 11, 2735);
        String m18 = C0006.m18(f49short, 323, 12, 983);
        String m47 = C0015.m47(f49short, 335, 9, 1813);
        String m472 = C0015.m47(f49short, 344, 11, 2959);
        String m52 = C0017.m52(f49short, 355, 8, 1095);
        String m182 = C0006.m18(f49short, 363, 8, 2096);
        String m12 = C0004.m12(f49short, 371, 7, 945);
        String m43 = C0014.m43(f49short, 378, 8, 1973);
        String m372 = C0012.m37(f49short, 386, 6, 3016);
        try {
            V0();
            Init.getPackage();
            ArrayList arrayList = new ArrayList();
            ArrayList arrayList2 = new ArrayList();
            JSONObject jSONObject = new JSONObject();
            JSONObject jSONObject2 = new JSONObject();
            StringBuilder sb = new StringBuilder();
            sb.append(this.V0);
            sb.append(C0000.m1(f49short, 392, 34, 472));
            sb.append(list.get(0));
            JSONObject jSONObject3 = new JSONObject(jP.h(fP.oq(sb.toString(), q()), this.q)).getJSONObject(C0001.m3(f49short, 426, 4, 417)).getJSONObject(C0000.m1(f49short, 430, 6, 835));
            jSONObject.put(m372, jSONObject3.getString(m372));
            jSONObject.put(m43, jSONObject3.getString(m43));
            jSONObject.put(m12, jSONObject3.getString(m12));
            jSONObject.put(C0007.m26(f49short, 436, 9, 1411), jSONObject3.getString(C0007.m26(f49short, 445, 9, 406)));
            jSONObject.put(m182, jSONObject3.getString(m182));
            jSONObject.put(m52, jSONObject3.getString(m52));
            jSONObject.put(m472, jSONObject3.getString(m472));
            jSONObject.put(m47, jSONObject3.getString(m47));
            jSONObject.put(m18, jSONObject3.getString(m18));
            jSONObject.put(m6, "" + jSONObject3.getString(m6));
            JSONArray jSONArray = jSONObject3.getJSONArray(C0013.m41(f49short, 454, 13, 543));
            int i = 0;
            while (true) {
                int length = jSONArray.length();
                int i2 = 1616;
                while (true) {
                    i2 ^= 1633;
                    switch (i2) {
                        case 14:
                        case 49:
                            i2 = i < length ? 1709 : 1678;
                        case 204:
                            JSONObject jSONObject4 = jSONArray.getJSONObject(i);
                            JSONArray jSONArray2 = jSONObject4.getJSONArray(C0006.m18(f49short, 467, 4, 868));
                            ArrayList arrayList3 = new ArrayList();
                            String string = jSONObject4.getString(C0013.m41(f49short, 471, 4, 335));
                            String string2 = jSONObject4.getString(C0012.m37(f49short, 475, 4, 344));
                            String str = list.get(0);
                            int i3 = 0;
                            while (true) {
                                int length2 = jSONArray2.length();
                                int i4 = 1740;
                                while (true) {
                                    i4 ^= 1757;
                                    switch (i4) {
                                        case 17:
                                            i4 = i3 < length2 ? 1833 : 1802;
                                        case 54:
                                        case 471:
                                            break;
                                        case 500:
                                            JSONObject jSONObject5 = jSONArray2.getJSONObject(i3);
                                            arrayList3.add(jSONObject5.getString(C0014.m43(f49short, 479, 4, 3245)) + C0015.m47(f49short, 483, 1, 451) + jSONObject5.getString(C0018.m56(f49short, 484, 3, 2763)) + m37 + string2 + m37 + str);
                                            int i5 = i3 + 1;
                                            int i6 = 1864;
                                            while (true) {
                                                i6 ^= 1881;
                                                switch (i6) {
                                                    case 17:
                                                        i6 = 48674;
                                                    case 47483:
                                                        break;
                                                }
                                            }
                                            i3 = i5;
                                            break;
                                    }
                                    arrayList2.add(string);
                                    arrayList.add(TextUtils.join(C0008.m27(f49short, 487, 1, 788), arrayList3));
                                    int i7 = i + 1;
                                    int i8 = 48767;
                                    while (true) {
                                        i8 ^= 48784;
                                        switch (i8) {
                                            case 14:
                                                break;
                                            case 239:
                                                i8 = 48798;
                                                break;
                                        }
                                    }
                                    i = i7;
                                }
                            }
                            break;
                        case 239:
                            break;
                    }
                    String join = TextUtils.join(m17, arrayList2);
                    String join2 = TextUtils.join(m17, arrayList);
                    jSONObject.put(C0013.m41(f49short, 488, 13, 923), join);
                    jSONObject.put(C0006.m18(f49short, 501, 12, 1730), join2);
                    JSONArray jSONArray3 = new JSONArray();
                    jSONArray3.put(jSONObject);
                    jSONObject2.put(C0007.m26(f49short, 513, 4, 1919), jSONArray3);
                    return jSONObject2.toString();
                }
            }
        } catch (Throwable th) {
            return "";
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:6:0x006c. Please report as an issue. */
    public String homeContent(boolean z) {
        String m37 = C0012.m37(f49short, 517, 9, 3203);
        try {
            V0();
            JSONArray jSONArray = new JSONObject(jP.h(fP.oq(this.V0 + C0018.m56(f49short, 526, 22, 2616), q()), this.q)).getJSONObject(C0006.m18(f49short, 548, 4, 1599)).getJSONArray(C0001.m3(f49short, 552, 5, 500));
            JSONArray jSONArray2 = new JSONArray();
            int i = 0;
            while (true) {
                int length = jSONArray.length();
                int i2 = 1616;
                while (true) {
                    i2 ^= 1633;
                    switch (i2) {
                        case 14:
                        case 49:
                            i2 = i < length ? 1709 : 1678;
                        case 204:
                            JSONObject jSONObject = new JSONObject();
                            JSONObject jSONObject2 = jSONArray.getJSONObject(i);
                            String string = jSONObject2.getString(m37);
                            boolean contains = string.contains(C0005.m17(f49short, 557, 2, 3149));
                            String m12 = C0004.m12(f49short, 559, 7, 2136);
                            int i3 = 1740;
                            while (true) {
                                i3 ^= 1757;
                                switch (i3) {
                                    case 17:
                                        i3 = contains ? 1833 : 1802;
                                    case 54:
                                    case 471:
                                        jSONObject.put(m12, jSONObject2.getString(m12));
                                        jSONObject.put(m37, string);
                                        jSONArray2.put(jSONObject);
                                        break;
                                    case 500:
                                        this.W = jSONObject2.getString(m12);
                                        int i4 = 1864;
                                        while (true) {
                                            i4 ^= 1881;
                                            switch (i4) {
                                                case 17:
                                                    i4 = 48674;
                                                case 47483:
                                                    break;
                                            }
                                        }
                                        break;
                                }
                            }
                            i++;
                            int i5 = 48767;
                            while (true) {
                                i5 ^= 48784;
                                switch (i5) {
                                    case 14:
                                        break;
                                    case 239:
                                        i5 = 48798;
                                        break;
                                }
                            }
                            break;
                        case 239:
                            break;
                    }
                    JSONObject jSONObject3 = new JSONObject();
                    jSONObject3.put(C0002.m6(f49short, 566, 5, 1092), jSONArray2);
                    return jSONObject3.toString();
                }
            }
        } catch (Throwable th) {
            return "";
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:21:0x00b0. Please report as an issue. */
    /* JADX WARN: Failed to find 'out' block for switch in B:41:0x00d9. Please report as an issue. */
    public String homeVideoContent() {
        String m37 = C0012.m37(f49short, 571, 11, 1550);
        String m47 = C0015.m47(f49short, 582, 7, 2600);
        String m372 = C0012.m37(f49short, 589, 8, 2135);
        String m373 = C0012.m37(f49short, 597, 6, 2893);
        try {
            String str = this.W;
            int i = 1616;
            while (true) {
                i ^= 1633;
                switch (i) {
                    case 14:
                    case 49:
                        i = str == null ? 1709 : 1678;
                    case 204:
                        this.W = C0011.m35(f49short, 603, 2, 830);
                        break;
                    case 239:
                        break;
                }
            }
            JSONObject jSONObject = new JSONObject(jP.h(fP.oq(this.V0 + C0006.m18(f49short, 605, 30, 2277) + this.W, q()), this.q));
            JSONArray jSONArray = new JSONArray();
            JSONArray jSONArray2 = jSONObject.getJSONObject(C0011.m35(f49short, 635, 4, 623)).getJSONArray(C0007.m26(f49short, 639, 11, 1200));
            int i2 = 0;
            while (true) {
                int length = jSONArray2.length();
                int i3 = 1740;
                while (true) {
                    i3 ^= 1757;
                    switch (i3) {
                        case 17:
                            i3 = i2 < length ? 1833 : 1802;
                        case 54:
                        case 471:
                            break;
                        case 500:
                            JSONArray jSONArray3 = jSONArray2.getJSONObject(i2).getJSONArray(C0014.m43(f49short, 650, 14, 2989));
                            int i4 = 0;
                            while (true) {
                                int length2 = jSONArray3.length();
                                int i5 = 1864;
                                while (true) {
                                    i5 ^= 1881;
                                    switch (i5) {
                                        case 17:
                                            i5 = i4 < length2 ? 48736 : 48705;
                                        case 47384:
                                            break;
                                        case 47417:
                                            JSONObject jSONObject2 = new JSONObject();
                                            JSONObject jSONObject3 = jSONArray3.getJSONObject(i4);
                                            jSONObject2.put(m373, jSONObject3.getString(m373));
                                            jSONObject2.put(m372, jSONObject3.getString(m372));
                                            jSONObject2.put(m47, jSONObject3.getString(m47));
                                            jSONObject2.put(m37, jSONObject3.getString(m37));
                                            jSONArray.put(jSONObject2);
                                            i4++;
                                            int i6 = 48767;
                                            while (true) {
                                                i6 ^= 48784;
                                                switch (i6) {
                                                    case 14:
                                                        break;
                                                    case 239:
                                                        i6 = 48798;
                                                        break;
                                                }
                                            }
                                            break;
                                        case 47483:
                                    }
                                    int i7 = i2 + 1;
                                    int i8 = 48891;
                                    while (true) {
                                        i8 ^= 48908;
                                        switch (i8) {
                                            case 22:
                                                break;
                                            case 503:
                                                i8 = 48922;
                                                break;
                                        }
                                    }
                                    i2 = i7;
                                }
                            }
                            break;
                    }
                    JSONObject jSONObject4 = new JSONObject();
                    jSONObject4.put(C0003.m9(f49short, 664, 4, 2542), jSONArray);
                    return jSONObject4.toString();
                }
            }
        } catch (Throwable th) {
            return "";
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:9:0x0014, code lost:
    
        return;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public void init(android.content.Context r2, java.lang.String r3) {
        /*
            r1 = this;
            java.lang.String r0 = "ۨۨ۟"
        L2:
            int r0 = com.github.catvod.parser.C0006.m20(r0)
            switch(r0) {
                case 1748736: goto L14;
                case 1753634: goto Lf;
                default: goto L9;
            }
        L9:
            super.init(r2)
            java.lang.String r0 = "ۦۦۢ"
            goto L2
        Lf:
            r1.BQ = r3
            java.lang.String r0 = "ۣۡۢ"
            goto L2
        L14:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.github.catvod.spider.Shark.init(android.content.Context, java.lang.String):void");
    }

    public String playerContent(String str, String str2, List<String> list) {
        try {
            String[] split = str2.split(C0015.m47(f49short, 668, 2, 967));
            String str3 = split[0];
            String str4 = split[1];
            String str5 = split[2];
            String V0 = jP.V0(j(str4), this.I);
            String h2 = jP.h(jP.V0(str3, CE.h(this.I + str5, CE.V0)).split(C0000.m1(f49short, 670, 1, 2133))[0].split(C0011.m35(f49short, 671, 1, 2675))[1], this.oC);
            String str6 = this.V0 + C0007.m26(f49short, 672, 31, 427);
            HashMap hashMap = new HashMap();
            hashMap.put(C0015.m47(f49short, 703, 5, 1363), V0);
            hashMap.put(C0004.m12(f49short, 708, 3, 2986), h2);
            hashMap.put(C0018.m56(f49short, 711, 8, 1575), "");
            JSONObject jSONObject = new JSONObject();
            fP.BQ(fP.j(), str6, hashMap, q(), new L.yh(this, jSONObject) { // from class: com.github.catvod.spider.Shark.2

                /* renamed from: short, reason: not valid java name */
                private static final short[] f51short = {742, 737, 767, 2167, 2150, 2165, 2164, 2146};
                final JSONObject V0;
                final Shark j;

                {
                    this.j = this;
                    this.V0 = jSONObject;
                    int m45 = C0015.m45();
                    int i = 1616;
                    while (true) {
                        i ^= 1633;
                        switch (i) {
                            case 14:
                            case 49:
                                i = m45 <= 0 ? 1709 : 1678;
                            case 204:
                                System.out.println(Float.parseFloat(C0000.m2("dA87RM5efbh6vfXQCsaPw2rchx")));
                                break;
                            case 239:
                                break;
                        }
                        return;
                    }
                }

                @Override // com.github.catvod.spider.merge.L
                public void onFailure(Call call, Exception exc) {
                }

                @Override // com.github.catvod.spider.merge.L
                public String onResponse(String str7) {
                    String m56 = C0018.m56(f51short, 0, 3, 659);
                    try {
                        this.V0.put(m56, new JSONObject(jP.h(str7, this.j.q)).getString(m56));
                        this.V0.put(C0000.m1(f51short, 3, 5, 2055), 0);
                    } catch (JSONException e) {
                        int i = 1616;
                        while (true) {
                            i ^= 1633;
                            switch (i) {
                                case 14:
                                    break;
                                case 49:
                                    i = 1647;
                                    break;
                            }
                        }
                    }
                    return str7;
                }
            });
            return jSONObject.toString();
        } catch (Exception e) {
            SpiderDebug.log(e);
            return null;
        }
    }

    /* JADX WARN: Failed to find 'out' block for switch in B:6:0x00aa. Please report as an issue. */
    public String searchContent(String str, boolean z) {
        String m47 = C0015.m47(f49short, 719, 11, 1584);
        String m43 = C0014.m43(f49short, 730, 7, 3227);
        String m12 = C0004.m12(f49short, 737, 8, 2609);
        String m37 = C0012.m37(f49short, 745, 6, 2429);
        try {
            V0();
            JSONObject jSONObject = new JSONObject();
            String oq = fP.oq(this.V0 + C0009.m30(f49short, 751, 27, 1359) + URLEncoder.encode(str) + C0003.m9(f49short, 778, 17, 2808), q());
            JSONArray jSONArray = new JSONArray();
            JSONArray jSONArray2 = new JSONObject(jP.h(oq, this.q)).getJSONObject(C0017.m52(f49short, 795, 4, 1681)).getJSONArray(C0005.m17(f49short, 799, 11, 1595));
            int i = 0;
            while (true) {
                int length = jSONArray2.length();
                int i2 = 1616;
                while (true) {
                    i2 ^= 1633;
                    switch (i2) {
                        case 14:
                        case 49:
                            i2 = i < length ? 1709 : 1678;
                        case 204:
                            JSONObject jSONObject2 = jSONArray2.getJSONObject(i);
                            JSONObject jSONObject3 = new JSONObject();
                            jSONObject3.put(m37, jSONObject2.getString(m37));
                            jSONObject3.put(m12, jSONObject2.getString(m12));
                            jSONObject3.put(m43, jSONObject2.getString(m43));
                            jSONObject3.put(m47, jSONObject2.getString(m47));
                            jSONArray.put(jSONObject3);
                            int i3 = i + 1;
                            int i4 = 1740;
                            while (true) {
                                i4 ^= 1757;
                                switch (i4) {
                                    case 17:
                                        i4 = 1771;
                                        break;
                                    case 54:
                                        break;
                                }
                            }
                            i = i3;
                            break;
                        case 239:
                            break;
                    }
                    jSONObject.put(C0012.m37(f49short, 810, 4, 963), jSONArray);
                    return jSONObject.toString();
                }
            }
        } catch (Throwable th) {
            return "";
        }
    }
}
